<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <!-- 基础meta标签优化 -->
    <title>Robin's Home Page</title>
    <link rel="icon" href="_media/favicon.ico" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0">
    <meta name="google-site-verification" content="8zPP57TpeWx3Gkf44cacLWN9asPbgFb5GIOU9YFt92o" />
    <meta name="description" content="通用人工智能技术文档,主要收集人工智能相关的算法,论文,技术,笔记等">
    <meta name="keywords" content="人工智能 大语言模型 科技生活 技术文档">
    <meta name="author" content="Robin">
    <!-- 样式文件 -->
    <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/lib/themes/vue.css" />
    <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify-sidebar-collapse/dist/sidebar.min.css" />
    <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.css" />
    <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.css" />
    <link rel="stylesheet" href="//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.css" />
    <link rel="stylesheet" href="_media/amzn_style.css" />
    <link rel="stylesheet" href="_media/netflix_style.css" />
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/prism-themes/themes/prism-vsc-dark-plus.css">

    <!-- 内联样式优化 -->
    <style>
        :root {
            --sidebar-width: 320px;
            --content-max-width: 900px;
            --main-max-width: 2000px;
            --font-family: 'Inter', 'Microsoft YaHei', 'PingFang SC', 'Source Han Sans SC', 'Noto Sans SC', 'WenQuanYi Micro Hei', Arial, sans-serif;
            --font-family-en: 'Inter', 'Georgia', 'Times New Roman', Arial, sans-serif;
            --font-weight-normal: 400;
            --font-weight-bold: 600;
            --theme-color: #42b983;
            --header-height: 60px;
            --transition-speed: 0.2s;
        }

        body {
            font-family: var(--font-family);
            font-weight: var(--font-weight-normal);
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            line-height: 1.7;
            letter-spacing: 0.01em;
            background-color: #f9f9f9;
            color: #222;
            margin: 0;
            padding: 0;
        }

        .main-wrapper {
            display: flex;
            justify-content: center;
            max-width: var(--main-max-width);
            margin: 0 auto;
            min-height: 100vh;
            background: #fff;
            box-shadow: 0 0 24px rgba(0, 0, 0, 0.06);
        }

        .markdown-section {
            max-width: var(--content-max-width);
            margin: 2rem auto;
            padding: 2rem;
            background: white;
            box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
            border-radius: 8px;
            font-size: 17px;
            font-family: var(--font-family);
            color: #222;
            margin-top: 2.5rem;
        }

        /* 当前页面标识 */
        .app-nav a.active {
            color: #fff;
            background: rgba(0, 0, 0, 0.15);
            border-radius: 4px;
        }

        .sidebar {
            width: var(--sidebar-width);
            background: #222;
            color: #fff;
            padding: 2em 1em;
            box-sizing: border-box;
            min-height: 100vh;
        }

        /* Headings */
        .markdown-section h1,
        .markdown-section h2,
        .markdown-section h3,
        .markdown-section h4,
        .markdown-section h5,
        .markdown-section h6 {
            margin-top: 1.8rem;
            margin-bottom: 1rem;
            font-family: var(--font-family-en), var(--font-family);
            font-weight: var(--font-weight-bold);
            letter-spacing: 0.02em;
            line-height: 1.25;
            color: #2c3e50;
            position: relative;
            transition: all 0.3s ease;
        }

        .markdown-section h1 {
            font-size: 2rem;
            border-bottom: 2px solid var(--theme-color);
            padding-bottom: 0.6rem;
            margin-top: 0;
        }

        .markdown-section h2 {
            font-size: 1.8rem;
            border-bottom: 1px solid #eaecef;
            padding-bottom: 0.4rem;
        }

        .markdown-section h3 {
            font-size: 1.5rem;
        }

        /* Inline code */
        .markdown-section code:not(pre code) {
            background: #f4f6fa;
            padding: 0.05em 0.2em !important;
            border-radius: 3px !important;
            font-size: inherit !important;
            font-family: 'Fira Mono', 'Consolas', 'Menlo', monospace;
            border: 1px solid #ececec;
            box-shadow: none;
            transition: background 0.2s;
            word-break: break-all;
            vertical-align: baseline;
        }

        .markdown-section code:not(pre code):hover {
            background: #e6f7ef;
            color: #197278;
        }

        /* Code blocks */
        .markdown-section pre,
        .markdown-section pre code {
            background: #1e1e1e !important;
            color: #d4d4d4 !important;
            padding: 1rem;
            border-radius: 6px;
            font-size: 0.95em;
            font-family: 'Fira Mono', 'Consolas', monospace;
        }

        .token.comment {
            color: #6A9955 !important;
        }

        /* Blockquotes */
        .markdown-section>blockquote {
            border-left: 3px solid var(--theme-color) !important;
            background: linear-gradient(90deg, #f8f9fa 80%, #e6f7ef 100%) !important;
            padding: 0.5em 0.8em 0.8em 0.8em !important;
            margin: 1.5em 0 !important;
            border-radius: 8px !important;
            font-size: 1.0em;
            box-shadow: 0 2px 8px rgba(66, 185, 131, 0.04);
            position: relative;
            transition: background 0.2s;
            overflow-wrap: break-word;
            word-wrap: break-word;
            word-break: break-word;
            hyphens: auto;
        }

        .markdown-section>blockquote::before {
            color: var(--theme-color);
            font-size: 2.2em;
            position: absolute;
            left: 0.4em;
            top: 0.1em;
            opacity: 0.18;
            pointer-events: none;
            font-family: serif;
        }

        .markdown-section>blockquote p {
            margin: 0.5em 0;
            padding: 0;
            line-height: 1.6;
            color: #444;
            max-width: 100%;
        }

        /* Images */
        .markdown-section img,
        figure img {
            display: block;
            margin: 1.5rem auto;
            max-width: 100%;
            height: auto;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
            transition: transform var(--transition-speed);
        }

        .markdown-section img:hover,
        figure img:hover {
            transform: scale(1.02);
        }

        figure {
            text-align: center;
            margin: 2rem 0;
        }

        .markdown-section p:has(img) {
            text-align: center;
        }

        .markdown-section>img {
            display: block;
            margin: 1.5rem auto;
        }

        .katex-display>.katex {
            max-width: 100%;
            overflow-x: auto;
            overflow-y: hidden;
        }

        figcaption {
            margin-top: 0.75rem;
            color: #666;
            font-size: 0.95em;
            font-style: italic;
        }

        /* Navigation bar */
        .app-nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100vw;
            left: 0;
            margin: 0 !important;
            border-radius: 0 !important;
            position: relative;
            box-sizing: border-box;
            background: #42b983;
            color: #fff;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            padding: 0 2vw;
        }

        .app-nav ul {
            display: flex;
            flex: 1;
            justify-content: space-evenly;
            align-items: center;
            margin: 0;
            padding: 0;
            list-style: none;
            width: 100%;
        }

        .app-nav li {
            flex: 1;
            text-align: center;
        }

        .app-nav a {
            display: block;
            width: 100%;
            color: #fff !important;
            font-weight: bold;
            font-size: 18px;
            transition: color 0.2s, background 0.2s;
            padding: 1rem 0;
            text-decoration: none;
        }

        .app-nav a:hover {
            color: #ffd700 !important;
            background: rgba(0, 0, 0, 0.08);
            border-radius: 4px;
        }

        /* Search box */
        .search {
            margin: 1rem;
            position: relative;
        }

        .search input {
            width: 100%;
            padding: 0.75rem 1rem 0.75rem 2.5rem;
            border: 1px solid #dfe2e5;
            border-radius: 6px;
            font-size: 1rem;
        }

        /* Vue button */
        .vue-button {
            background-color: var(--theme-color);
            color: white;
            border: none;
            padding: 0.6rem 1.2rem;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.2s;
            font-size: 1rem;
            margin: 0.5rem 0;
        }

        .vue-button:hover {
            background-color: #3aa876;
        }

        /* Table styles */
        .table-wrapper {
            display: block;
            width: 100%;
            margin: 1.5rem auto;
            border-radius: 8px;
            background: white;
            position: relative;
            overflow: hidden;
            /* 改回hidden以确保圆角效果 */
            -webkit-overflow-scrolling: touch;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            padding: 0;
            border: 1px solid #e2e8f0;
            /* 添加边框 */
        }

        /* 为Firefox添加滚动条样式 */
        .table-wrapper {
            scrollbar-width: thin;
            scrollbar-color: var(--theme-color) #f1f3f4;
        }

        /* 为Webkit浏览器(Chrome、Safari等)添加滚动条样式 */
        .table-wrapper::-webkit-scrollbar {
            height: 8px;
        }

        .table-wrapper::-webkit-scrollbar-track {
            background: #f1f3f4;
            border-radius: 4px;
        }

        .table-wrapper::-webkit-scrollbar-thumb {
            background: var(--theme-color);
            border-radius: 4px;
            border: 2px solid #f1f3f4;
            background-clip: padding-box;
        }

        .table-wrapper::-webkit-scrollbar-thumb:hover {
            background: #3aa876;
            border: 1.5px solid #f1f3f4;
        }

        .markdown-section table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0;
            margin: 0;
            background: white;
            border-radius: 8px;
            overflow: hidden;
            font-size: 0.95em;
            table-layout: auto;
            border: 1px solid #e2e8f0;
            white-space: normal;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }

        .markdown-section table th {
            background: var(--theme-color);
            color: white;
            font-weight: 600;
            padding: 0.8rem 1rem;
            text-align: center;
            border: 1px solid rgba(255,255,255,0.2);
            font-size: 0.95em;
            letter-spacing: 0.3px;
            position: relative;
            white-space: nowrap;
            min-width: 50px;
            overflow: hidden;
            text-overflow: ellipsis;
            vertical-align: middle;
            text-shadow: 0 1px 1px rgba(0,0,0,0.1);
        }

        .markdown-section table th:first-child {
            border-top-left-radius: 8px;
        }

        .markdown-section table th:last-child {
            border-top-right-radius: 8px;
        }

        .markdown-section table td {
            padding: 0.8rem 1rem;
            border: 1px solid #e2e8f0;
            vertical-align: middle;
            line-height: 1.5;
            white-space: normal;
            background: #ffffff;
            min-width: 50px;
            word-break: break-word;
            text-align: center;
            font-size: 0.9em;
            color: #333;
            position: relative;
            transition: background-color 0.2s ease;
        }

        /* 确保最后一行单元格的底部边框可见 */
        .markdown-section table tr:last-child td {
            border-bottom: 1px solid #e2e8f0;
        }

        /* 确保第一列和最后一列的边框可见 */
        .markdown-section table td:first-child {
            border-left: 1px solid #e2e8f0;
        }

        .markdown-section table td:last-child {
            border-right: 1px solid #e2e8f0;
        }

        .markdown-section table tr:last-child td {
            border-bottom: 1px solid #e2e8f0;
        }

        .markdown-section table tr:hover {
            background-color: #f8f9fa;
            transition: background-color 0.2s ease;
        }

        .markdown-section table tr:nth-child(even) {
            background-color: #f8fafc;
        }

        .markdown-section table tr:nth-child(even):hover {
            background-color: #f1f5f9;
        }

        .markdown-section table code {
            background-color: #f1f3f4;
            color: #d73a49;
            padding: 0.2em 0.4em;
            border-radius: 3px;
            font-size: 1em;
            font-family: 'Fira Mono', 'Consolas', monospace;
        }

        .markdown-section table a {
            color: var(--theme-color);
            text-decoration: none;
            transition: color 0.2s ease;
        }

        .markdown-section table a:hover {
            color: #3aa876;
            text-decoration: underline;
        }

        /* Footer */
        .footer {
            text-align: center;
            padding: 1.5rem;
            color: #666;
            font-size: 0.9rem;
            margin-top: 2rem;
            border-top: 1px solid #eee;
        }

        /* Go to top button */
        .goup-container {
            position: fixed;
            bottom: 2rem;
            right: 2rem;
            z-index: 1000;
        }

        .goup-container .goup {
            background-color: var(--theme-color);
            color: white;
            border: none;
            border-radius: 50%;
            width: 50px;
            height: 50px;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            transition: all 0.3s ease;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 1.5rem;
        }

        .goup-container .goup:hover {
            transform: translateY(-4px);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
        }

        /* Custom scrollbars (Webkit & Firefox) */
        ::-webkit-scrollbar {
            width: 12px;
            height: 12px;
        }

        ::-webkit-scrollbar-track {
            background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
            border-radius: 6px;
            border: 1px solid #dee2e6;
            box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        ::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, var(--theme-color) 0%, #3aa876 100%);
            border-radius: 6px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
            transition: all 0.3s ease;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, #3aa876 0%, #2d8a5f 100%);
            box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
            transform: scale(1.05);
        }

        ::-webkit-scrollbar-thumb:active {
            background: linear-gradient(180deg, #2d8a5f 0%, #1f6b4a 100%);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
        }

        ::-webkit-scrollbar-corner {
            background: #f8f9fa;
            border-radius: 6px;
        }

        .markdown-section pre::-webkit-scrollbar {
            height: 8px;
        }

        .markdown-section pre::-webkit-scrollbar-track {
            background: #2d2d2d;
            border-radius: 4px;
        }

        .markdown-section pre::-webkit-scrollbar-thumb {
            background: #555;
            border-radius: 4px;
            border: none;
        }

        .markdown-section pre::-webkit-scrollbar-thumb:hover {
            background: #777;
        }

        .table-wrapper::-webkit-scrollbar {
            height: 8px;
            cursor: pointer;
        }

        .table-wrapper::-webkit-scrollbar-track {
            background: #f1f3f4;
            border-radius: 4px;
            margin: 0 4px;
        }

        .table-wrapper::-webkit-scrollbar-thumb {
            background: linear-gradient(90deg, var(--theme-color) 0%, #3aa876 100%);
            border-radius: 4px;
            border: 2px solid #fff;
            background-clip: padding-box;
        }

        .table-wrapper::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(90deg, #3aa876 0%, #2d8a5f 100%);
            border: 1.5px solid #fff;
        }

        /* 添加滚动提示阴影 */
        .table-wrapper::after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            width: 30px;
            background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.9));
            opacity: 0;
            transition: opacity 0.3s;
            pointer-events: none;
            z-index: 1;
        }

        .table-wrapper:hover::after {
            opacity: 1;
        }

        /* 确保markdown中的表格正确显示 */
        .markdown-section>table {
            display: table;
            /* 改为table显示 */
            width: 100%;
            margin: 0;
            border-collapse: collapse;
        }

        /* 移除所有表格相关的滚动条样式 */
        .table-wrapper::-webkit-scrollbar,
        .markdown-section table::-webkit-scrollbar {
            display: none;
        }

        * {
            scrollbar-width: thin;
            scrollbar-color: var(--theme-color) #f8f9fa;
        }

        .custom-scroll {
            scrollbar-width: thin;
            scrollbar-color: var(--theme-color) transparent;
        }

        .custom-scroll::-webkit-scrollbar {
            width: 6px;
        }

        .custom-scroll::-webkit-scrollbar-track {
            background: transparent;
        }

        .custom-scroll::-webkit-scrollbar-thumb {
            background: rgba(66, 185, 131, 0.5);
            border-radius: 3px;
        }

        .custom-scroll::-webkit-scrollbar-thumb:hover {
            background: rgba(66, 185, 131, 0.8);
        }

        /* Loading spinner */
        #app {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            font-size: 1.2rem;
            color: var(--theme-color);
            flex-direction: column;
        }

        .loading-spinner {
            width: 50px;
            height: 50px;
            border: 5px solid rgba(66, 185, 131, 0.2);
            border-top: 5px solid var(--theme-color);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 1rem;
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        /* Responsive styles (merged and grouped) */
        @media (max-width: 768px) {
            .markdown-section {
                padding: 1.25rem;
                margin-left: 0 !important;
                margin-right: 0 !important;
                max-width: 100% !important;
                width: 100% !important;
            }

            .sidebar,
            .sidebar-toggle {
                display: none !important;
            }

            .content,
            .app {
                margin-left: 0 !important;
                padding-left: 0 !important;
                width: 100% !important;
            }

            .markdown-section h1 {
                font-size: 2rem;
            }

            .markdown-section h2 {
                font-size: 1.6rem;
            }

            .app-nav {
                padding: 0.5rem;
            }

            .search {
                margin: 0.5rem;
            }

            .search input {
                font-size: 16px;
            }

            .goup-container {
                bottom: 1rem;
                right: 1rem;
            }

            .goup-container .goup {
                width: 45px;
                height: 45px;
                font-size: 1.2rem;
            }

            .markdown-section img,
            figure img {
                margin: 1rem auto;
                border-radius: 6px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            }

            .markdown-section>blockquote {
                padding: 0.8em 0.7em 0.8em 0.9em !important;
                font-size: 1em;
                border-radius: 6px !important;
            }

            .markdown-section>blockquote::before {
                font-size: 1.8em;
                left: 0.3em;
            }

            .markdown-section table {
                font-size: 0.9em;
                margin: 1rem 0;
                min-width: 100%;
            }

            .markdown-section table th,
            .markdown-section table td {
                padding: 0.75rem 0.8rem;
                min-width: 60px;
            }

            .table-wrapper {
                margin: 1rem 0;
                border-radius: 4px;
                -webkit-overflow-scrolling: touch;
            }

            .table-wrapper::-webkit-scrollbar {
                height: 6px;
            }

            .table-wrapper::-webkit-scrollbar-track {
                background: rgba(248, 249, 250, 0.9);
                border-radius: 3px;
            }

            .table-wrapper::-webkit-scrollbar-thumb {
                background: var(--theme-color);
                border-radius: 3px;
                border: 1.5px solid #fff;
                background-clip: padding-box;
            }

            .table-wrapper::-webkit-scrollbar-thumb:hover {
                background: #3aa876;
                border: 1px solid #fff;
            }
        }

        @media (max-width: 480px) {
            .markdown-section {
                padding: 1rem;
                margin-top: 1rem;
            }

            .markdown-section h1 {
                font-size: 1.8rem;
            }

            .markdown-section h2 {
                font-size: 1.4rem;
            }

            .app-nav {
                padding: 0.25rem;
            }

            .app-nav a {
                font-size: 16px;
            }

            .markdown-section table {
                font-size: 0.85em;
                min-width: 100%;
            }

            .markdown-section table th,
            .markdown-section table td {
                padding: 0.6rem 0.7rem;
                min-width: 50px;
            }
        }

        html {
            scroll-behavior: smooth;
        }

        /* 代码块折叠样式 */
        .markdown-section pre[data-expandable] {
            position: relative;
            max-height: 300px;
            overflow: hidden;
            transition: max-height 0.3s ease;
        }

        .markdown-section pre[data-expandable]::after {
            content: "展开代码";
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            text-align: center;
            padding: 10px;
            background: linear-gradient(transparent, #1e1e1e);
            color: var(--theme-color);
            cursor: pointer;
            font-size: 14px;
        }

        .markdown-section pre[data-expandable].expanded {
            max-height: none;
        }

        .markdown-section pre[data-expandable].expanded::after {
            content: "收起代码";
            background: #1e1e1e;
        }
    </style>
</head>

<body>
    <div id="app">
        <div class="loading-spinner"></div>
        <div>Loading ...</div>
    </div>
    <div id="gitalk-container"></div>

    <script src="//cdn.jsdelivr.net/npm/docsify-plugin-carbon@1"></script>
    <script>
        // 全局变量定义
        let num = 0;
        const PDF_MARGIN_TOP = '20px';
        const PDF_MARGIN_BOTTOM = '20px';

        // Docsify configuration
        window.$docsify = {
            // name: 'Machine-Learning-Wiki',
            name: '<span> Robin AI Lab </span>',
            repo: 'https://github.com/jianzhnie',
            homepage: 'README.md',
            //自动跳转到页面顶部
            auto2top: true,
            // 封面
            coverpage: true,
            // 封面和内容单独显示
            onlyCover: true,
            // 执行页面上的脚本。只解析第一个脚本标记（演示）。如果存在Vue，则默认开
            executeScript: true,
            // 侧边栏
            loadSidebar: true,
            // 顶栏
            loadNavbar: true,
            // load from _footer.md
            loadFooter: true,
            coverpage: true,
            onlyCover: true, // 让封面和内容同时显示
            // 小屏设备下合并导航栏到侧边栏
            mergeNavbar: true,
            // 最大支持渲染的标题层级
            maxLevel: 4,
            // 自定义侧边栏后默认不会再生成目录，设置生成目录的最大层级（建议配置为2-4）
            subMaxLevel: 3,
            //自动显示标题
            autoHeader: false,
            // 使用相对路径
            relativePath: false,
            // 404页面
            notFoundPage: true,
            notFoundPage: 'error.md',
            // 日期格式
            formatUpdated: '{YYYY}-{MM}-{DD} {HH}:{mm}',
            // 谷歌分析 SEO
            ga: 'UA-46744044-1',
            //搜索插件
            search: {
                placeholder: '🔍 搜索文档...',
                paths: 'auto',
                noData: '😔 抱歉！找不到对应的结果',
                maxAge: 86400000,
                depth: 6,
                hideOtherSidebarContent: false,
                namespace: 'Robin\'s Home Page',
                pathNamespaces: ['/'],
                maxResults: 20,
            },

            alias: {
                '/.*/_navbar.md': '/_navbar.md',
            },

            // 代码复制配置
            copyCode: {
                buttonText: 'Copy to clipboard',
                errorText: 'Error!',
                successText: 'Copied!'
            },

            // 分页配置
            pagination: {
                previousText: '上一节',
                nextText: '下一节',
                crossChapter: true,
                crossChapterText: true,
            },

            // 标签页配置
            tabs: {
                persist: true,
                sync: true,
                theme: 'classic',
                tabComments: true,
                tabHeadings: true
            },

            // 字数统计配置
            count: {
                countable: true,
                position: 'top',
                margin: '10px',
                float: 'right',
                fontsize: '0.9em',
                color: 'rgb(90,90,90)',
                language: 'chinese',
                localization: {
                    words: "字",
                    minute: "分钟"
                },
                isExpected: true
            },
            // Markdown 渲染器优化
            markdown: {
                renderer: {
                    image: function (href, title, text) {
                        // 按照原来的渲染 img
                        var image_html = this.origin.image.apply(this, arguments);
                        // 用 figure 包一下图片，实现居中
                        return '<figure>' + image_html + '<figcaption>' + text + '</figcaption></figure>';
                    },
                    code: function (code, lang, base = null) {
                        // Mermaid 图表渲染
                        if (lang === "mermaid") {
                            try {
                                return '<div class="mermaid">' + mermaid.render("mermaid-svg-" + num++, code) + "</div>";
                            } catch (error) {
                                console.error('Mermaid rendering error:', error);
                                return '<pre><code class="language-mermaid">' + code + '</code></pre>';
                            }
                        }

                        // DOT 图表渲染
                        if (lang === "dot") {
                            try {
                                return '<div class="viz">' + Viz(code, "SVG") + '</div>';
                            } catch (error) {
                                console.error('DOT rendering error:', error);
                                return '<pre><code class="language-dot">' + code + '</code></pre>';
                            }
                        }

                        // PDF 渲染
                        function pdf_renderer(code, lang, verify) {
                            function unique_id_generator() {
                                function rand_gen() {
                                    return Math.floor((Math.random() + 1) * 65536).toString(16).substring(1);
                                }
                                return rand_gen() + rand_gen() + '-' + rand_gen() + '-' + rand_gen() + '-' + rand_gen() + '-' + rand_gen() + rand_gen() + rand_gen();
                            }
                            if (lang && !lang.localeCompare('pdf', 'en', { sensitivity: 'base' })) {
                                if (verify) {
                                    return true;
                                } else {
                                    var divId = "markdown_code_pdf_container_" + unique_id_generator().toString();
                                    var container_list = new Array();
                                    if (localStorage.getItem('pdf_container_list')) {
                                        container_list = JSON.parse(localStorage.getItem('pdf_container_list'));
                                    }
                                    container_list.push({ "pdf_location": code, "div_id": divId });
                                    localStorage.setItem('pdf_container_list', JSON.stringify(container_list));
                                    return '<div style="margin-top:' + PDF_MARGIN_TOP + '; margin-bottom:' + PDF_MARGIN_BOTTOM + ';" id="' + divId + '">' + '<a href="' + code + '">📄 查看 PDF</a>' + '</div>';
                                }
                            }
                            return false;
                        }
                        if (pdf_renderer(code, lang, true)) {
                            return pdf_renderer(code, lang, false);
                        }
                        // 默认使用 python 语言高亮
                        if (!lang || lang.trim() === '') {
                            lang = 'python';
                        }
                        // 其它所有代码块，使用默认渲染器（保证 copy 按钮正常）
                        // 处理普通代码块
                        const lines = code.split('\n');
                        let codeHtml = (base ? base : this.origin.code.apply(this, [code, lang, base]));

                        // 如果代码超过8行，添加折叠功能
                        if (lines.length > 8) {
                            codeHtml = codeHtml.replace('<pre', '<pre data-expandable');
                        }

                        return codeHtml;
                    },
                },
            },
            // Vue 组件配置
            vueComponents: {
                'button-counter': {
                    template: '<button @click="count += 1" class="vue-button">点击了 {{ count }} 次</button>',
                    data: function () {
                        return { count: 0 };
                    },
                },
            },
            vueGlobalOptions: {
                data: function () {
                    return {
                        count: 0,
                        message: 'Hello, World!',
                        // Fake API response
                        images: [
                            { title: 'Image 1', url: 'https://picsum.photos/150?random=1' },
                            { title: 'Image 2', url: 'https://picsum.photos/150?random=2' },
                            { title: 'Image 3', url: 'https://picsum.photos/150?random=3' },
                        ],
                    };
                },
                computed: {
                    timeOfDay: function () {
                        const date = new Date();
                        const hours = date.getHours();
                        if (hours < 12) return 'morning';
                        else if (hours < 18) return 'afternoon';
                        else return 'evening';
                    },
                },
                methods: {
                    hello: function () {
                        alert(this.message);
                    },
                },
            },
            vueMounts: {
                '#counter': {
                    data: function () {
                        return { count: 0 };
                    },
                },
            },
        }
    </script>
    <!-- 阅读时间估算 -->
    <script src="//unpkg.com/docsify-reading-time/dist/reading-time.min.js"></script>
    <!-- 目录导航 -->
    <script src="//unpkg.com/docsify-toc@1.0.0/dist/toc.min.js"></script>
    <!-- 页面书签 -->
    <script src="//unpkg.com/docsify-bookmark/dist/bookmark.min.js"></script>
    <!-- latex 公式渲染 -->
    <script src="https://cdn.jsdelivr.net/npm/katex@latest/dist/katex.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/marked@3"></script>
    <script src="//cdn.jsdelivr.net/npm/docsify-katex@latest/dist/docsify-katex.js"></script>
    <!-- 支持 DOT 语言 -->
    <script src="https://notebook.js.org/plugin/viz.js"></script>
    <!-- docsify的js依赖 -->
    <script src="//cdn.jsdelivr.net/npm/vue@2/dist/vue.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/docsify@4/lib/docsify.min.js"></script>
    <!-- 搜索功能支持  -->
    <script src="//cdn.jsdelivr.net/npm/docsify@4/lib/plugins/search.min.js"></script>
    <!-- 图片放大缩小支持 -->
    <script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/zoom-image.min.js"></script>
    <!-- 图片标题 -->
    <script src="https://unpkg.com/@h-hg/docsify-image-caption/dist/docsify-image-caption.min.js"></script>
    <!-- 添加 PDF 页面展示功能 -->
    <script src="https://notebook.js.org/plugin/pdfobject.min.js"></script>
    <script src="https://notebook.js.org/plugin/docsify-pdf-embed.js"></script>
    <!-- emoji表情支持 -->
    <script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/emoji.min.js"></script>
    <!-- 红心点击特效 -->
    <script src="//cdn.jsdelivr.net/gh/jerryc127/butterfly_cdn@2.1.0/js/click_heart.js"></script>
    <!-- 谷歌分析 -->
    <script src="https://notebook.js.org/plugin/js/ga.min.js"></script>
    <!-- 访问量统计 -->
    <script async src="https://notebook.js.org/plugin/js/busuanzi.pure.mini.js"></script>
    <!-- 外链脚本 -->
    <script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/external-script.min.js"></script>
    <!-- 添加页 AutoHeader -->
    <script src="https://cdn.jsdelivr.net/npm/@markbattistella/docsify-autoheaders@latest"></script>
    <!-- 添加页脚 -->
    <script src="//cdn.jsdelivr.net/npm/@alertbox/docsify-footer/dist/docsify-footer.min.js"></script>
    <!-- 翻页 -->
    <script src="//unpkg.com/docsify-pagination/dist/docsify-pagination.min.js"></script>
    <!-- 字数统计 -->
    <script src="//unpkg.com/docsify-count/dist/countable.js"></script>
    <!-- 导航栏折叠 -->
    <script src="//cdn.jsdelivr.net/npm/docsify-sidebar-collapse/dist/docsify-sidebar-collapse.min.js"></script>
    <!-- 在markdown里回显tabs -->
    <script src="//cdn.jsdelivr.net/npm/docsify-tabs@1.6.1/dist/docsify-tabs.min.js"></script>
    <!-- 支持 mermaid -->
    <script src="//cdn.jsdelivr.net/npm/mermaid/dist/mermaid.min.js"></script>
    <!-- 代码复制 -->
    <script src="//cdn.jsdelivr.net/npm/docsify-copy-code"></script>
    <!-- Markdown 引用样式美化 -->
    <script src="https://unpkg.com/docsify-plugin-flexible-alerts"></script>
    <script src="https://cdn.jsdelivr.net/npm/docsify-progress@latest/dist/progress.min.js"></script>
    <!-- 代码高亮:引入其他语言扩展 -->
    <script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-bash.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-cpp.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-c.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-css.min.js"></script>
    <script src="https://notebook.js.org/plugin/prism-docker.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-http.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-json.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-markdown.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-python.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-shell-session.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/prismjs/components/prism-yaml.min.js"></script>
    <!-- 复制提醒 -->
    <script src="https://cdn.bootcss.com/sweetalert/1.1.3/sweetalert.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/gitalk.min.js"></script>
    <script src="//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.min.js"></script>

    <!-- Gitalk 评论系统 -->
    <script>
        const gitalk = new Gitalk({
            clientID: 'Ov23liLV6QeSv9YZSuqt',
            clientSecret: 'a949192290612ccf6eeaa83d8becad40d457e25f',
            repo: 'llmtech',
            owner: 'jianzhnie',
            admin: ['jianzhnie'],
            title: location.hash.match(/#(.*?)([?]|$)/)[1],
            id: location.hash.match(/#(.*?)([?]|$)/)[1],
            distractionFreeMode: false,
            createIssueManually: true,
            enableHotKey: true,
        });
        gitalk.render('gitalk-container').catch(err => {
            console.error('Gitalk error:', err);
        });
        // 监听URL中hash的变化，如果发现换了一个MD文件，那么刷新页面，解决整个网站使用一个gitalk评论issues的问题。
        window.onhashchange = function (event) {
            if (event.newURL.split('?')[0] !== event.oldURL.split('?')[0]) {
                location.reload();
            }
        }
    </script>
    <!-- 回到顶部功能 -->
    <script src="https://notebook.js.org/plugin/jquery.js"></script>
    <script src="https://notebook.js.org/plugin/jquery.goup.js"></script>
    <script type="text/javascript">
        $(document).ready(function () {
            $.goup({
                trigger: 100,
                bottomOffset: 52,
                locationOffset: 25,
                title: 'TOP',
                titleAsText: true,
                containerColor: '#42b983',
                containerSize: 50,
                locationGap: 25,
            });
        });
    </script>
    <script>
        // 添加代码块折叠交互
        document.addEventListener('click', function (e) {
            const pre = e.target.closest('pre[data-expandable]');
            if (pre) {
                pre.classList.toggle('expanded');
            }
        });
    </script>
</body>

</html>
